home *** CD-ROM | disk | FTP | other *** search
- IFND GRAPHICS_SCREENS_I
- GRAPHICS_SCREENS_I SET 1
-
- **
- ** $VER: screens.i V0.9B
- **
- ** Screen Definitions.
- **
- ** (C) Copyright 1996-1997 DreamWorld Productions.
- ** All Rights Reserved.
- **
-
- IFND DPKERNEL_I
- include 'games/dpkernel.i'
- ENDC
-
- *****************************************************************************
- * Module definitions.
-
- ScrModVersion = 0
- ScrModRevision = 9
-
- *****************************************************************************
- * Screen object.
-
- SCRVERSION = 1
- TAGS_SCREEN = (ID_SPCTAGS<<16)|ID_SCREEN
-
- STRUCTURE GS,HEAD_SIZEOF ;[00] Standard header.
- APTR GS_MemPtr1 ;[12] Ptr to screen 1.
- APTR GS_MemPtr2 ;[16] Ptr to screen 2 (doubled buffer)
- APTR GS_MemPtr3 ;[20] Ptr to screen 3 (tripled buffer)
- APTR GS_Next ;[24] Reserved.
- APTR GS_Palette ;[28] Ptr to the screen palette.
- APTR GS_Raster ;[32] Ptr to a raster object.
- LONG GS_EMPTY ;[36]
- WORD GS_Width ;[40] The width of the visible screen window.
- WORD GS_Height ;[42] The height of the visible screen window.
- WORD GS_XOffset ;[44] Hardware co-ordinate for TOS.
- WORD GS_YOffset ;[46] Hardware co-ordinate for LOS.
- WORD GS_BmpXOffset ;[48] Offset of the horizontal axis.
- WORD GS_BmpYOffset ;[50] Offset of the vertical axis.
- WORD GS_ScrMode ;[52] What screen mode is it?
- WORD GS_Emp ;[54] Reserved.
- LONG GS_Attrib ;[56] Special Attributes are?
- APTR GS_Task ;[60] Task that owns this screen.
- APTR GS_Bitmap ;[64] Pointer to bitmap structure (for blitting).
- WORD GS_Switch ;[68] Set to 1 when ready to switch buffers.
-
- ;All of the following fields are private and you will break
- ;compatibility with other GMS versions if you try and access them.
-
- WORD GS_Prv ;....
- APTR GS_TypeEmulator ;Emulation.
- APTR GS_Monitor ;Monitor driver.
- APTR GS_EMemPtr1 ;Chunky driver.
- APTR GS_EMemPtr2 ;Chunky driver.
- APTR GS_EMemPtr3 ;Chunky driver.
- APTR GS_EFree1 ;Chunky driver.
- APTR GS_EFree2 ;Chunky driver.
- APTR GS_EFree3 ;Chunky driver.
- BYTE GS_ColBits ;0 = 12bit, 1 = 24bit.
- BYTE GS_Pad ;Unused.
- LONG GS_ShowKey ;Resource key if the screen is shown.
- LONG GS_Scratch ;Scratch address!
- APTR GS_ScreenPrefs ;Screen preferences for this screen.
- APTR GC_LineWait ;Line Wait till bitplanes start.
- APTR GC_End ;Ptr to the copper's jump end. (26!)
- WORD GC_BurstLevel ;FMode setting for bitplanes.
- APTR GC_Control ;BPLCON0
- APTR GC_Modulo ;The screen modulo.
- APTR GC_ScrPosition ;DIW's, DDF's, DIWHIGH
- APTR GC_Start ;Start of main copperlist.
- APTR GC_Sprites ;Pointer to the copper sprites.
- APTR GC_Colours ;Pointer to the copper colours.
- WORD GC_AmtBankCols ;Amount of colours per bank (AGA).
- WORD GC_AmtBanks ;Amount of banks in total (AGA).
- WORD GC_HiLoOffset ;Offset between hi and lo bits (AGA)
- APTR GC_Bitplanes1 ;Ptr to copper bitplane loaders #1.
- APTR GC_Bitplanes2 ;Ptr to copper bitplane loaders #2.
- APTR GC_Bitplanes3 ;Ptr to copper bitplane loaders #3.
- APTR GC_ColListJmp ;Jumper to RasterList.
- LONG GD_BmpXOffset ;X offset for scrolling.
- LONG GD_BmpYOffset ;Y offset for scrolling.
- WORD GD_ScrollBWidth ;Set to 2 if scrolling.
- APTR GD_MemPtr1 ;Original screen mem start (1).
- APTR GD_MemPtr2 ;Original screen mem start (2).
- APTR GD_MemPtr3 ;Original screen mem start (3).
- WORD GD_BPLCON3 ;BPLCON3 actual data (not a ptr).
- WORD GD_AmtFields ;Amount of PlayFields on screen.
- WORD GD_FieldNum ;Number of this field...
- WORD GD_ScrLRWidth ;ScrWidth, in lo-resolution.
- WORD GD_ScrLRBWidth ;ScrByteWidth, in lo-resolution.
- WORD GD_PicLRWidth ;PicWidth, in lo-resolution.
- WORD GD_TOSX ;Top of screen X for this screen.
- WORD GD_TOSY ;Top of screen Y for this screen.
- APTR GD_CopperMem ;Pointer to original screen mem start.
- APTR GD_Bitmap ;Allocated bitmap.
- WORD GD_BlitXOffset ;Offset to use for blitting (hard-scroll).
- APTR GD_Palette ;Allocated palette.
-
- ;---------------------------------------------------------------------------;
- ;Screen Buffer names, these are asked for in the blitter functions.
-
- BUFFER1 = GS_MemPtr1
- BUFFER2 = GS_MemPtr2
- BUFFER3 = GS_MemPtr3
-
- ;---------------------------------------------------------------------------;
- ;Screen types (flags for GS_ScrType).
-
- INTERLEAVED = 1 ;Interleaved (2 ... 256 colours)
- ILBM = INTERLEAVED ;Short synonym of Interleaved.
- PLANAR = 2 ;Planar (2 ... 256 colours)
- CHUNKY8 = 3 ;Chunky 8 bit (256 colours)
- CHUNKY16 = 4 ;Chunky 16 bit (65535 colours)
- TRUECOLOUR = 5 ;True colour (16 million colours)
-
- ;---------------------------------------------------------------------------;
- ;Screen attributes and options (flags for GS_ScrAttrib).
-
- B_DBLBUFFER = 0
- B_TPLBUFFER = 1
- B_PLAYFIELD = 2
- B_HSCROLL = 3
- B_VSCROLL = 4
- B_SPRITES = 5
- B_SBUFFER = 6
- B_CENTRE = 7
- B_BLKBDR = 8
- B_NOSCRBDR = 9
- B_BLANKPALETTE = 10
-
- DBLBUFFER = (1<<B_DBLBUFFER) ;For double buffering.
- TPLBUFFER = (1<<B_TPLBUFFER) ;Triple buffering!!
- PLAYFIELD = (1<<B_PLAYFIELD) ;Set if it's part of a playfield.
- HSCROLL = (1<<B_HSCROLL) ;Gotta set this to do scrolling.
- VSCROLL = (1<<B_VSCROLL) ;For vertical scrolling.
- SPRITES = (1<<B_SPRITES) ;Set this if you want sprites.
- SBUFFER = (1<<B_SBUFFER) ;Create a scroll buffer for up to 100 screens.
- CENTRE = (1<<B_CENTRE) ;Centre the screen (sets ScrXOffset/ScrYOffset).
- BLKBDR = (1<<B_BLKBDR) ;Gives a blackborder on AGA machines.
- NOSCRBDR = (1<<B_NOSCRBDR) ;For putting sprites in the border.
- BLANKPALETTE = (1<<B_BLANKPALETTE) ;For a blank (black) palette.
-
- ;---------------------------------------------------------------------------;
- ;Screen modes (flags for GS_ScrMode).
-
- B_HIRES = 0
- B_SHIRES = 1
- B_LACED = 2
- B_LORES = 3
- B_EXTRAHB = 4
- B_SLACED = 5
- B_HAM = 6
-
- HIRES = (1<<B_HIRES) ;High resolution.
- SHIRES = (1<<B_SHIRES) ;Super-High resolution.
- LACED = (1<<B_LACED) ;Interlaced.
- LORES = (1<<B_LORES) ;Low resolution (default).
- EXTRAHB = (1<<B_EXTRAHB) ;Set for extra half-brite.
- HILACED = (1<<B_SLACED) ;Higher Laced resolution.
- HAM = (1<<B_HAM) ;For HAM mode.
-
- ;---------------------------------------------------------------------------;
- ;Screen Attribute tags.
-
- GSA_MemPtr1 = TAPTR|GS_MemPtr1
- GSA_MemPtr2 = TAPTR|GS_MemPtr2
- GSA_MemPtr3 = TAPTR|GS_MemPtr3
- GSA_Next = TAPTR|GS_Next
- GSA_Palette = TAPTR|GS_Palette
- GSA_Raster = TAPTR|GS_Raster
- GSA_Width = TWORD|GS_Width
- GSA_Height = TWORD|GS_Height
- GSA_XOffset = TWORD|GS_XOffset
- GSA_YOffset = TWORD|GS_YOffset
- GSA_BmpXOffset = TWORD|GS_BmpXOffset
- GSA_BmpYOffset = TWORD|GS_BmpYOffset
- GSA_Attrib = TLONG|GS_Attrib
- GSA_ScrMode = TWORD|GS_ScrMode
- GSA_Task = TAPTR|GS_Task
-
- GSA_BitmapTags = TSTEPIN|GS_Bitmap
-
- *****************************************************************************
- *
- STRUCTURE RasterV1,HEAD_SIZEOF
- APTR RAS_Command ;Pointer to the first command.
- APTR RAS_Screen ;Pointer to our Screen owner.
- LONG RAS_Flags ;Special flags.
-
- *****************************************************************************
- * Rasterlist Definitions.
-
- ID_RASTWAIT = 1
- ID_RASTFLOOD = 2
- ID_RASTCOLOUR = 3
- ID_RASTCOLOURLIST = 4
- ID_RASTMIRROR = 5
-
- ID_LASTCOMMAND = 6
-
- STRUCTURE RStatsV1,0
- LONG RSTAT_CopSize
- APTR RSTAT_CopPos
- LABEL RSTATS_SIZEOF
-
- STRUCTURE RHeadV1,0
- WORD RSH_ID
- WORD RSH_Version
- APTR RSH_Stats
- APTR RSH_Prev
- APTR RSH_Next
- LABEL RHEAD_SIZEOF
-
- STRUCTURE RWaitV1,RHEAD_SIZEOF
- WORD RSW_Line
-
- STRUCTURE RFloodV1,RHEAD_SIZEOF
-
- STRUCTURE RColourV1,RHEAD_SIZEOF
- LONG RSC_Colour
- LONG RSC_Value
-
- STRUCTURE RColourListV1,RHEAD_SIZEOF
- WORD RCL_Start
- WORD RCL_Skip
- LONG RCL_Colour
- APTR RCL_Values
-
- ENDC ;GRAPHICS_SCREENS_I
-